(function($){
    $.extend({
        statistic:function(id,dataX,data,titleX){
            $('#'+id).highcharts({
                chart: {
                    type: 'line'
                },
                title: {
                    text: ''
                },
                subtitle: {
                    text: ''
                },
                xAxis: {
                    title: {
                        text: titleX
                    },
                    categories: dataX,
                    gridLineColor:'#d5e3f3',
                    gridLineWidth:1
                },
                credits:{enabled:false},
                yAxis: {
                    title: {
                        text: '消息数 (条)'
                    },
                    gridLineColor:'#d5e3f3',
                    gridLineDashStyle:'longdash',
                    gridLineWidth:1
                },
                tooltip: {
//                    enabled: false,
                    formatter: function() {
                        return '<b>'+ this.series.name +'</b><br>'+this.x +': '+ this.y +'条';
                    },
                    style: {
                        color: '#4d759e',
                        fontSize: '12px',
                        padding: '8px'
                    }
                },
                legend: {
                    floating: 'true',
                    align: 'left',
                    verticalAlign: 'bottom',
                    borderWidth: 0
                },
                series: [{
                    name: '消息统计',
                    data: data
                }]
            });
        }
    })
})(jQuery)